package com.example.lol.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public abstract class BaseFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = inflater.inflate(contentView(),container,false);

        initView(rootView);
        bindData();
        bindEvent();
        return rootView;
    }

    protected abstract int contentView();

    protected abstract void initView(View rootView);

    protected abstract void bindData();

    protected abstract void bindEvent();
}
